package com.bananascrum.pages;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

public class SprintPage extends Page {

	public SprintPage(WebDriver driver) {
		super(driver);
	}

	public boolean isOpen() throws Throwable {
		return isTextPresent("About sprint")
				&& isElementPresent(By.linkText("Admin"));
	}

	public ProductBacklogPage goToProductBackloPage() {
		SprintPage sprintPage = new SprintPage(driver);
		sprintPage.click(By.className("backlog"));
		return new ProductBacklogPage(driver);
	}
}
